<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/dishes-body.css" type="text/css" />
<link rel="stylesheet" href="css/dishes-nav.css" type="text/css" />
<link rel="stylesheet" href="css/dishes-main.css" type="text/css" />
<title>Insert title here</title>
</head>

<body>
	<div id="dishes-header" class="header">
		<img alt="" src="ImageLoader?path=${sessionScope.loginToken.imageUrl}"
			width="60px" height="60px">
		${sessionScope.loginToken.mName}&nbsp;&nbsp;
		review:${MType}&nbsp;&nbsp; status:${sessionScope.mstatus} <br> <a
			href="LogoutServlet" style="color: blue;">logout</a>
	</div>
	<div align="left">
		<a href="ListDishServlet">back</a>
	</div>
<div align="center">
	<h1>Add Dish</h1>
	<form action="AddDishServlet" method="post"
		enctype="multipart/form-data">
		Name:<input type="text" name="dName"></input> <br> Price:<input
			type="text" name="dPrice"> <br> Image:<input type="file"
			name="image"> <br> <input type="hidden" name="mid"
			value="${sessionScope.loginToken.mId}"> Dish Type:<select
			name="pId">
			<c:forEach items="${sessionScope.tlists}" var="dishType">
				<c:if test="${dishType.pId eq '000'}"></c:if>
				<c:if test="${dishType.pId != '000' && dishType.pId==dish.pId}">
					<option value="${dishType.pId}" selected="selected">${dishType.pname}</option>
				</c:if>
				<c:if test="${dishType.pId != '000' && dishType.pId!=dish.pId }">
					<option value="${dishType.pId}">${dishType.pname}</option>
				</c:if>
			</c:forEach>
		</select> <br> <input type="submit" value="Add">

	</form>
	</div>
</body>
</html>